home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 11
/
FM Towns Free Software Collection 11.iso
/
t_os
/
data
/
mee
/
list.plt
next >
Wrap
Text File
|
1995-08-20
|
8KB
|
445 lines
var a[1024*32];
var b[1024];
var c[1024];
var d[1024];
var l[1024];
var s[1024];
var t[1024];
var al[1024];
var ln[1024];
var file[256];
var val[256];
var sp[1];
var cr[1];
var yyyy[4];
var yy[2];
var MM[2];
var dd[2];
var www[3];
var hh[2];
var mm[2];
var ss[2];
var mons[256];
sp:={ };
cr:=@xc({0d});
mons:={ Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec};
var Date[256];
var MessageID[256];
var From[256];
var To[256];
var Subject[256];
var Path[256];
var KTm[256];
var Time[256];
var Subj[256];
var Note[256];
var Res[256];
var Title[256];
var oTitle[256];
var Bytes[256];
var Bh[256];
var bbstype[256];
var bbsname[256];
tab(4);
chat({Yes});
%months{[n]
im(@getchar(mons,n*4-2,3));
};
%monnam{[ptn]
im((@nochar(@head(mons,ptn))+3)/4);
};
%wdel{[ptna]
val:={No};
case(@getchar(ptna,1,1),
{ },{a:=@getchar(ptna,2);a:=@wdel(a);},
{\n},{a:=@getchar(ptna,2);a:=@wdel(a);},
tab,{a:=@getchar(ptna,2);a:=@wdel(a);}
);
im(a);
};
%spdel{[t]
case(
{ } = @getchar(t,1,1) ,
{Yes}, {
s := @getchar(t,2,);
s := @spdel(s);
},
{No}, {
s:=t;
},
);
im(s);
};
%ug{[ptn,n]
im(@getchar({0000000000}|(ptn+0),@nochar(ptn+0)+11-n,n));
};
%instr{[ptn,ptn2]
var p[256];
p:=@nochar(ptn);
case(p>=@nochar(ptn2),
{Yes},{
case(@nochar(@body(ptn,ptn2))=0,
{Yes},{
case(@getchar(ptn,p+1-@nochar(ptn2))<>ptn2,
{Yes},{p:=0;},
);
},
{No},{
p:=@nochar(@head(ptn,ptn2))+1;
}
);
},
{No},{p:=0}
);
im(p);
};
%mmmtime{[Bytes]
var yy[2];
var MM[2];
var dd[2];
var hh[2];
var mm[2];
var ss[2];
var mon[256];
var time[256];
var date[256];
var keta[256];
date:=@body(Bytes,{Date : },{ Author:});
case(@nochar(@body(date,{m}))<>0,
{Yes},{
yy:=@ug(@tail(@head(Bytes,{Author:}),{/},{ }),2);
MM:=@ug(@head(@tail(date,{m }),{/}),2);
mon:=@months(MM);
dd:=@ug(@body(Bytes,{/},{/}),2);
time:=@body(Bytes,{Date : },{m });
keta:=@nochar(time);
hh:=@head(time,{:})+0;
case(@getchar(time,keta,1),{p},{hh:=hh+12;});
hh:=@ug(hh,2);
mm:=@ug(@tail(@getchar(time,1,keta-1),{:}),2);
ss:={};
},
{No},{
yy:=@ug(@head(date,{/}),2);
mon:=@months(@ug(@body(date,{/},{/}),2));
dd:=@ug(@head(@tail(date,{/}),{ }),2);
hh:=@ug(@body(date,{ },{:}),2);
mm:=@ug(@body(date,{:},{:}),2);
ss:=@ug(@head(@tail(date,{:}),{ }),2);
}
);
im(yy|mon|dd|hh|mm|ss);
};
%swap{[org,ptn1,ptn2]
s:={};
t:=org;
loop({
s:=s|@head(t,ptn1);
t:=@body(t,ptn1);
case(t<>{},{Yes},{s:=s|ptn2;});
im(t<>{});
});
im(s);
};
%memoput{[a]
mclear(@mlast);
madd(@mlast,a);
mopen(@mlast,0,21,639,400);
waitx(9999);
case(@mcheck=0,{No},{mclose(1);});
};
%putlist{[l]
case(ln-@tail(al,{/})<>0,{Yes},{
case(bbstype,
{DJL},{
al:= al|{[}|ln-@tail(al,{/})|{]#}|
@head(@tail(a,{Subject: }),{\n})|{\n};
},
{KTBBS},{
al:= al|{[}|ln-@tail(al,{/})|{]#}|
@head(@tail(a,{Subj: }),{\n})|{\n};
},
{mmm},{
al:= al|{[}|ln-@tail(al,{/})-1|{]#}|
/*@head(@body(a,{Title: }),{\n})|{\n};*/
/*@body(Title,{Title: })|{\n};*/
oTitle|{\n};
},
{Tokyobbs},{
al:= al|{[}|ln-@tail(al,{/})-1|{]#}|
/*@getchar(Bh,36)|{\n};*/
oTitle|{\n};
Title:=@getchar(Bh,36);
},
{BM},{
al:= al|{[}|ln-@tail(al,{/})-1|{]#}|
/*@getchar(Bh,36)|{\n};*/
oTitle|{\n};
Title:=@getchar(Bh,36);
},
);
write({d:}|@head(file,{:},{.})|{.lis},al);
a:={};
footnote(oTitle);
wait(1);
/*madd(@mlast,al);
mopen(@mlast,0,21,639,400);*/
}
);
ln:=0;
/*case(@mcheck=0,{No},{mclose(1);});
*/
case(bbstype,
{DJL},{al:= To|{!fwdnet }|
@getchar(Date,8,2)|@getchar(Date,4,3)|@getchar(Date,1,2)|
@getchar(Date,11,2)|@getchar(Date,14,2)|
{<}|@head(From,{@})|{.}|@body(MessageID,{<},{>})|
/*{.}|@body(From,{.},{.})|*/{>}|
file|{/}|l;
},
{KTBBS},{al:= @getchar(@body(@body(Time,{Se}),{: }),1,20)|{ }|
@getchar(Time,7,2)|
@months(@getchar(Time,10,2))|
@getchar(Time,13,2)|
@getchar(({0}|@getchar(Time,16,2)+0),(@nochar(@getchar(Time,16,2)+0)),2)|
@getchar(Time,19,2)|
{<}|@tail(KTm,{from: },{ })|{.}|
@tail(Time,{Section },{:})|{-}|
@tail(@body(KTm,{#},{ is}),{ })|{@}|
bbsname|
{>}|
file|{/}|l;
},
{mmm},
{al:=@getchar(@spdel(@body(@getchar(Note,10),{},{(})),1,20)|{ }|
@mmmtime(Bytes)|
{<}|@head(@body(Bytes,{Author: }),{ })|{.}|
/*
@body(Res,{RESPONSE:},{ of})+0|{@}|
@tail(Note,{(},{)})|{-}|@head(@body(Note,{ }),{ },{ })|
*/
@head(@body(Note,{ }),{ },{ })|{-}|@body(Res,{RESPONSE:},{ of})+0|{@}|
@swap(@tail(Note,{(},{)}),{.},{-})|
/*{.}|bbsname|*/
{>}|
file|{/}|l
;
},
{Tokyobbs},{al:={ }|
@getchar(Bh,8,2)|@months(@getchar(Bh,11,2))|
@getchar(Bh,14,2)|
@getchar(Bh,17,2)|@getchar(Bh,20,2)|
{<}|@head(@getchar(Bh,26,8),{ })|{.}|
@tail(@getchar(Bh,1,5),{・})+0|{@}|
bbsname|
{>}|
file|{/}|l;
},
{BM},{al:={ }|
@getchar(Bh,8,2)|@months(@getchar(Bh,11,2))|
@getchar(Bh,14,2)|
@getchar(Bh,17,2)|@getchar(Bh,20,2)|@getchar(Bh,23,2)|
{<}|@head(@getchar(Bh,26,8),{ })|{.}|
@getchar(Bh,1,5)+0|{@}|
bbsname|
{>}|
file|{/}|l;
},
);
};
%nextr{
b := @fread;
case(@nochar(b)>@nochar(@head(b,{\n})),
{No},{b:=b|@fread;}
);
l:=l+1;
};
/*case(@mcheck=0,{No},{mclose(1);});
*//*mopen(@mlast+1);*/
/*madd(@mlast+1,{});*/
var sysdir[128];
sysdir:=@getcdir;
file:=@filesel;
file:=@tail(@getcdir,{},{\})|{\}|file;
case(@tail(file,{.}),{LZH},{
setcdir({d:\tmp});
command(sysdir|{lha e }|file);
file:=@filesel;
}
);
case(@tail(file,{.})<>{LOG},{Yes},{bbsname:=@body(file,{.});});
/*a:=@read(file);*/
fopen(file);
/*a:=@read(file);*/
l:=0;
loop({
/*b:=@head(a,{\n});
a:=@body(a,{\n});
*/
/*b:=@read(file,l,1);*/
nextr;
footnote(c);
case(@head(b,sp),
/*DJLBBS(RLI)*/
{Date:},{c:=c|{D};Date:=@head(@body(b,sp),cr);},
{Message-ID:},{c:=c|{M};MessageID:=@head(@body(b,sp),cr);},
{From:},{c:=c|{F};From:=@head(@body(b,sp),cr);},
{To:},{c:=c|{T};To:=@head(@body(b,sp),cr);},
{Subject:},{c:=c|{S};Subject:=@head(@body(b,sp),cr);},
{Path:},{c:=c|{P};Path:=@head(@body(b,sp),cr)},
/*KTBBS*/
{Message},{c:=c|{KTm};KTm:=@head(b,cr);},
{Time:},{c:=c|{Time};Time:=@head(b,cr)},
{Subj:},{c:=c|{S};Subj:=@head(b,cr)},
/*MMM*/
{Note},{c:=c|{Mmm};Note:=@head(b,cr)},
{[},{c:=c|{R};Res:=@head(b,cr)},
{Title:},{
c:=c|{Title};
case(Subject={},
{Yes},{oTitle:=Title;},
{No},{oTitle:=Subject;Subject:={};}
);
Title:=@body(b,{Title: },cr);
Subject:={};
},
{Bytes:},{c:=c|{B};Bytes:=@head(b,cr)},
{No.==},{
nextr;
case(@head(b,{ })<>{^},{Yes},
{c:=c|{Tbbs};Bh:=@head(b,cr);
}
);
oTitle:=Title;
Title:=@getchar(Bh,36);
},
{-NUM-},{
nextr;
case(@head(b,{ })<>{^},{Yes},
{c:=c|{Bm};Bh:=@head(b,cr);
}
);
oTitle:=Title;
Title:=@getchar(Bh,36);
},
/*prt*/
{YSSC-BBS},{case(ln,0,{ln:=l});},
/**/ {r},{case(ln,0,{ln:=l});},
{[RET]:next},{case(ln,0,{ln:=l});},
{OPEN>\n},{case(ln,0,{ln:=l});},
);
case(@instr(c,{DMFTS})<>0,
{Yes},{
c:={};
case(ln,0,{ln:=l-4});
bbstype:={DJL};
putlist(l-4);
/*memoput(@body(a,{},{Date: }));*/
a:={Date: }|@tail(a,{Date: });
},
);
case(@instr(c,{KTmTimeS})<>0,
{Yes},{
c:={};
case(ln,0,{ln:=l-2});
bbstype:={KTBBS};
putlist(l-2);
a:={Message }|@tail(a,{Message });
},
);
case(@instr(c,{MmmRTitleB})<>0,
{Yes},{
c:={};
case(ln,0,{ln:=l-3});
bbstype:={mmm};
putlist(l-3);
a:={Note }|@tail(a,{Note });
},
);
case(@instr(c,{MmmRTitleSB})<>0,
{Yes},{
c:={};
case(ln,0,{ln:=l-3});
bbstype:={mmm};
putlist(l-4);
a:={Note }|@tail(a,{Note });
},
);
case(@instr(c,{Tbbs})<>0,
{Yes},{c:={};
case(ln,0,{ln:=l-1});
bbstype:={Tokyobbs};
putlist(l-1);
a:={No.== }|@tail(a,{No.== });
},
);
case(@instr(c,{Bm})<>0,
{Yes},{c:={};
case(ln,0,{ln:=l-1});
bbstype:={BM};
putlist(l-1);
a:={-NUM- }|@tail(a,{-NUM- });
},
);
case(b={},{Yes},{
c:={};
case(ln,0,{ln:=l});
putlist(l);
/*memoput(a);*/
a:={Date: }|@tail(a,{Date: });
});
a:=a|b;
im(b<>{});
});
fclose;